package com.easychat.enums;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.Getter;
import lombok.NoArgsConstructor;

/**
 * @author 10 2024/10/10
 */
@Getter
@AllArgsConstructor
@NoArgsConstructor
public enum UserContactApplyStatusEnum {

     INIT(0,"待处理"),
     PASS(1,"已同意"),
     REJECT(2,"已拒绝"),
     BLACKLIST(3,"已拉黑"),
     BLACKLIST_BE(4,"被拉黑");
     private Integer status;
     private String desc;

    public static UserContactApplyStatusEnum getByStatus(Integer status) {
        for (UserContactApplyStatusEnum value : UserContactApplyStatusEnum.values()){
            if(value.getStatus().equals(status)){
                return value;
            }
        }
        return null;
    }
}
